package businesslogic.userBl;

import java.util.ArrayList;

import po.informPO.StudentInformPO;
import vo.userVO.StudentVO;
import businesslogicservice.userblservice.StudentBLService;
import dataservice.ResultMessage;


public class StudentController  implements StudentBLService{

	StudentBLService student;
	private String UserID;
	
	
	public StudentController(String UserID) {
		this.UserID=UserID;
		student=new Student(UserID);
	}
	@Override
	public double getGPA(int term) throws Exception{
		return student.getGPA(term);
	}
	
	
	

	
	@Override
	public ResultMessage login(String id, char[] password) {
		return student.login(id, password);
	}
	@Override
	public ResultMessage changePassword(char[] oldPassword, char[] password1,
			char[] password2)  {
		return student.changePassword(oldPassword, password1, password2);
	}
	@Override
	public StudentVO getStudentVO() throws Exception{
		return student.getStudentVO();
	}
	@Override
	public String getUserName(String userID)throws Exception {
		return student.getUserName(userID);
	}
	@Override
	public int getUserType(String userID) throws Exception {
		return student.getUserType(userID);
	}
	@Override
	public ArrayList<StudentVO> findStudentByTermAndDepartment(int term,
			String department) throws Exception {
		return student.findStudentByTermAndDepartment(term, department);
	}
	


}
